import logging
import yagmail
def log_log():
    logging.basicConfig(level=logging.DEBUG,format="%(message)s -> %(asctime)s",handlers=[logging.StreamHandler(),logging.FileHandler("log.txt")])
def QQ_email(name):
    mail=yagmail.SMTP(user="1543298904@qq.com",password="lipvtwugdirpjicc",host="smtp.qq.com")
    mail.send(to="1543298904@qq.com",subject="测试报告",contents="请查收",attachments=name)